package Person.ith_16;

import javax.swing.*;

public class Animal {
    private String name;
    private int age;

    public String getName() {
        return name;
    }
    public void setName(String name)
    {
        this.name = name;
    }
    public int getAge(){
        return age;
    }
    public void setAge(int age)
    {
        this.age =age;
    }
    public void show()
    {
        System.out.println(age+name);
    }
}
class Dog extends Animal{
    private String color;
    public String getColor(){
        return color;
    }
    public void setColor(String color){
        this.color = color;
    }
}
class Main{
    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.setAge(18);
        dog.setName("二哈");
        dog.setColor("黑白相间");
        dog.show();
        System.out.println(dog.getColor());
    }
}
